﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RecycleList.ascx.cs" Inherits="Framework.Portal.Layouts.Admin.Components.Teenio.Workflow.RecycleList" %>
<%@ Register Assembly="System.Web.Extensions" Namespace="System.Web.UI" TagPrefix="asp" %>
<table align="center" width="100%" cellspacing="1" cellpadding="0" border="0" class="content">
<tr>
    <td class="header1" colspan="4" align="left">
        <asp:Label ID="lblCommandName" runat="server"></asp:Label>
    </td>
</tr>
<tr>
    <td colspan="4" class="header2" height="25">
        &nbsp;
    </td>
</tr>
<tr>
    <td class="postheader" width="15%" align="left">
        <strong>Từ khóa</strong></td>
    <td class="post" width="35%" align="left">
        <asp:TextBox ID="txtkeysearch" runat="server" Width="200px"></asp:TextBox></td>
    <td class="postheader" width="15%" align="left">
        <strong>Kiểu bài</strong></td>
    <td class="post" width="35%" align="left">
        <asp:DropDownList ID="drpContentType" runat="server" DataValueField="key" DataTextField="value"></asp:DropDownList></td>
</tr>
<tr>
    <td class="postheader" width="15%" align="left">
        <strong>Chuyên mục</strong></td>
    <td class="post" width="35%" align="left">
        <asp:DropDownList ID="dropZones" runat="server" Width="190px"></asp:DropDownList></td>
    <td class="postheader" width="15%" align="left">
        <strong>Loại bài</strong></td>
    <td class="post" width="35%" align="left">
        <asp:DropDownList ID="drpContentRank" runat="server" DataValueField="key" DataTextField="value"></asp:DropDownList></td>
</tr>
<tr>
    <td class="postheader" width="15%" align="left">
        <strong>Từ ngày</strong></td>
    <td class="post" width="35%" align="left">
        <asp:TextBox ID="txtFromDate" CssClass="inputDate" runat="server" Width="200px"></asp:TextBox>
    </td>    
    <td class="postheader" width="15%" align="left">
        <strong>Đến ngày</strong></td>
    <td class="post" width="35%" align="left">
        <asp:TextBox ID="txtToDate" CssClass="inputDate" runat="server" Width="200px"></asp:TextBox>
    </td>  
</tr>
<tr>
    <td class="postfooter" colspan="4" valign="middle" align="center">
        <asp:Button ID="btnSearch" runat="server" Text="Tìm kiếm" CssClass="pbutton" OnClick="btnSearch_Click" />        
    </td>
</tr>
</table>
<br />
<asp:UpdatePanel ID="uppanelDistribution" runat="server" UpdateMode="Conditional"
    RenderMode="Inline">
    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="btnSearch" EventName="Click" />
    </Triggers>
    <ContentTemplate>
        <table width="100%" cellspacing="1" cellpadding="0" border="0" class="content">
        <tr>
            <td class="header2" align="center" width="3%">
                #</td>
            <td class="header2" align="left" width="54%">
                <NS:Label ID="Label1" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="NAME" /></td>
            <td class="header2" align="left" width="15%">
                <NS:Label ID="Label2" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="ALIAS" /></td>                        
            <td class="header2" align="center" width="6%">
                <NS:Label ID="Label3" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="RANK" /></td>
            <td class="header2" align="center" width="5%">
                <NS:Label ID="Label5" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="VIEW" /></td>                        
            <td class="header2" align="center" width="5%">
                <NS:Label ID="Label6" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="RATED" /></td>
            <td class="header2" align="center" width="5%">
                <NS:Label ID="Label7" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="DOWNLOAD" /></td>                        
            <td class="header2" align="center" width="7%">
                <NS:Label ID="Label8" runat="server" LocalizedPage="TABLECAPTION" LocalizedTag="ACTION" /></td>
        </tr>
    <asp:Repeater ID="rptDistributed" runat="server" OnItemCommand="rptDistributed_ItemCommand"  OnItemDataBound="rptDistributed_ItemDataBound">
    <ItemTemplate>
        <tr>
            <td class="post" align="center">
                <asp:CheckBox ID="chkCheckThis" runat="server" /><asp:HiddenField ID="lblKey" runat="server" />
            </td>
            <td class="post" align="left">
                <asp:HyperLink ID="hplContent" runat="server"></asp:HyperLink>
            </td>
            <td class="post" align="left">
                <%# Eval("CONTENT_ALIAS")%>
            </td>
            <td class="post" align="center">
                <asp:DropDownList ID="drpRPTRANK" runat="server" DataValueField="key" DataTextField="value"></asp:DropDownList>
            </td>
            <td class="post" align="center">
                <%# Eval("CONTENT_VIEW")%>
            </td>
            <td class="post" align="center">
                <%# Eval("CONTENT_RATED")%>
            </td>
            <td class="post" align="center">
                <%# Eval("CONTENT_DOWNLOAD")%>
            </td>
            <td class="post" align="center">
                <NS:ImageButton LocalizedPage="IMAGEACTION" LocalizedTag="EDIT24" ID="btnImgManageProfile" runat="server" CommandArgument='<%# Eval("CONTENT_ID") %>' CommandName="edit" ToolTip="Sửa" />
                    &nbsp;
                <NS:ImageButton LocalizedPage="IMAGEACTION" LocalizedTag="UNPUBLISH24" ID="btnImgManagePassword" runat="server" CommandArgument='<%# Eval("CONTENT_ID") %>' CommandName="unpublish" ToolTip="Gỡ xuống" />
            </td>
        </tr>                        
    </ItemTemplate>
    <AlternatingItemTemplate>
        <tr>
            <td class="postheader" align="center">
                <asp:CheckBox ID="chkCheckThis" runat="server" /><asp:HiddenField ID="lblKey" runat="server" />
            </td>
            <td class="postheader" align="left">
                <asp:HyperLink ID="hplContent" runat="server"></asp:HyperLink>
            </td>
            <td class="postheader" align="left">
                <%# Eval("CONTENT_ALIAS")%>
            </td>
            <td class="postheader" align="center">
                <asp:DropDownList ID="drpRPTRANK" runat="server" DataValueField="key" DataTextField="value"></asp:DropDownList>
            </td>
            <td class="postheader" align="center">
                <%# Eval("CONTENT_VIEW")%>
            </td>
            <td class="postheader" align="center">
                <%# Eval("CONTENT_RATED")%>
            </td>
            <td class="postheader" align="center">
                <%# Eval("CONTENT_DOWNLOAD")%>
            </td>
            <td class="postheader" align="center">
                <NS:ImageButton LocalizedPage="IMAGEACTION" LocalizedTag="EDIT24" ID="btnImgManageProfile" runat="server" CommandArgument='<%# Eval("CONTENT_ID") %>' CommandName="edit" ToolTip="Sửa" />
                    &nbsp;
                <NS:ImageButton LocalizedPage="IMAGEACTION" LocalizedTag="UNPUBLISH24" ID="btnImgManagePassword" runat="server" CommandArgument='<%# Eval("CONTENT_ID") %>' CommandName="unpublish" ToolTip="Gỡ xuống" />
            </td>
        </tr>
    </AlternatingItemTemplate>
    </asp:Repeater>   
        <tr>
            <td class="postfooter" colspan="9" valign="middle" align="left" height="25">
                <asp:Button ID="Button1" runat="server" Text="Cập nhật" CssClass="pbutton" OnClick="btnUpdate_Click" />
                &nbsp;
                <asp:Label ID="lblUpdateStatus" runat="server" Font-Bold="True" ForeColor="Blue"></asp:Label>
        </tr>         
        </table>
    </ContentTemplate>
</asp:UpdatePanel>
<script type="text/javascript">
    $('#<%= txtFromDate.ClientID %>').DatePicker({
        format: 'd/m/Y',
        date: $('#<%= txtFromDate.ClientID %>').val(),
        current: $('#<%= txtFromDate.ClientID %>').val(),
        starts: 1,
        position: 'right',
        onBeforeShow: function () {
            $('#<%= txtFromDate.ClientID %>').DatePickerSetDate($('#<%= txtFromDate.ClientID %>').val(), true);
        },
        onChange: function (formated, dates) {
            $('#<%= txtFromDate.ClientID %>').val(formated);
            //$('#inputDate').DatePickerHide();
        }
    });
    $('#<%= txtToDate.ClientID %>').DatePicker({
        format: 'd/m/Y',
        date: $('#<%= txtToDate.ClientID %>').val(),
        current: $('#<%= txtToDate.ClientID %>').val(),
        starts: 1,
        position: 'right',
        onBeforeShow: function () {
            $('#<%= txtToDate.ClientID %>').DatePickerSetDate($('#<%= txtToDate.ClientID %>').val(), true);
        },
        onChange: function (formated, dates) {
            $('#<%= txtToDate.ClientID %>').val(formated);
            //$('#inputDate').DatePickerHide();
        }
    });		
</script>